import React from "react";
import { Link } from "react-router-dom";

export default function goods({ data }) {
    return (
        <div>
            <div className="new-goods">
                {data.map((item) => (
                    <div className="new-goods-item" key={item.get("id")}>
                        <img src={item.get("picUrl")} alt="" />
                        <Link
                            to={{
                                pathname: "/detail/" + item.get("id"),
                                state: { model: true },
                            }}
                        >
                            <h3>{item.get("name")}</h3>
                        </Link>
                        <p>￥{item.get("retailPrice")}</p>
                    </div>
                ))}
            </div>
        </div>
    );
}
